import {
  REPORT_STATUS_LIST,
  REPORTING_CONTENT_TYPE_LIST,
  REPORTING_TYPE_LIST,
} from '@/const/type';
export const tableOption = (viewTitle = '查看举报详情') => {
  return {
    ...window.$crudMixins.tableOptions,
    addBtn: false,
    editBtn: false,
    delBtn: false,
    menuWidth: 160,
    searchLabelWidth: 130,
    labelWidth: 130,
    viewBtn: false,
    viewTitle,
    column: [
      {
        label: '内容编号/宠物编号',
        prop: 'objCode',
      },
      {
        type: 'select',
        label: '内容类型',
        prop: 'objType',
        search: true,
        dicData: REPORTING_CONTENT_TYPE_LIST,
      },
      {
        type: 'select',
        label: '举报类型',
        prop: 'objContentType',
        dicData: REPORTING_TYPE_LIST,
      },
      {
        label: '发布用户编号',
        prop: 'objCreateCode',
        search: true,
        slot: true,
      },
      {
        label: '发布用户昵称',
        prop: 'objCreateBy',
        search: true,
      },
      {
        label: '举报时间',
        prop: 'searchCreateTime',
        type: 'date',
        width: 160,
        format: 'yyyy-MM-dd',
        valueFormat: 'yyyy-MM-dd',
        searchRange: true,
        search: true,
        hide: true,
        viewDisplay: false,
      },
      {
        label: '举报时间',
        prop: 'createTime',
        type: 'datetime',
        width: 160,
        format: 'yyyy-MM-dd HH:mm:ss',
        valueFormat: 'yyyy-MM-dd HH:mm:ss',
      },
      {
        label: '举报人编号',
        prop: 'createCode',
        search: true,
      },
      {
        label: '举报原因',
        prop: 'cause',
      },
      {
        label: '状态',
        prop: 'status',
        type: 'select',
        search: true,
        dicData: REPORT_STATUS_LIST,
      },
      {
        label: '详情描述',
        prop: 'detail',
        overHidden: true,
        width: 160,
        viewDisplay: false,
      },
    ],
    group: [
      {
        label: '详细描述',
        prop: 'introductionGroup',
        arrow: false,
        labelWidth: 0,
        column: [
          {
            prop: 'detail',
            type: 'textarea',
            minRows: 7,
            span: 24,
          },
        ],
      },
      {
        label: '内容截图',
        prop: 'introductionGroup1',
        arrow: false,
        labelWidth: 0,
        column: [
          {
            label: '',
            prop: 'picUrl',
            type: 'upload',
            // listType: 'picture-img',
            listType: 'picture-card', //img/video/audio
            row: true,
            span: 24,
          },
          {
            prop: 'audit',
            type: 'radio',
            label: '',
            slot: true,
          },
        ],
      },
    ],
  };
};
